﻿Imports DAO
Imports DTO

Public Class ChiTietHoaDonBUS
    ' ' ' ' ' Đưa Thông tin nhân viên lên DataGridView
    Public Sub ThemChiTietHoaDon(ByVal ct As ChiTietHoaDonDTO)
        Dim chi As New ChiTietHoaDonDAO
        chi.ThemChiTietHoaDon(ct)
    End Sub



    Public Function LayBang() As DataTable
        Dim dt As New DataTable
        Dim nv As New NhanVienDAO()
        dt = nv.LayDanhSachNhanVien()
        Return dt
    End Function

    ' ' ' Thêm Nhân Viên

    ' ' '  Xóa Nhân Viên

    Public Sub DeleteSach(ByVal idSach_Loai As TheLoaiDTO)

        Dim chitiet As New ChiTietHoaDonDAO
        chitiet.DeleteSach_Loai(idSach_Loai)

    End Sub


    Public Function LayChiTietHoaDon(ByVal ct As ChiTietHoaDonDTO) As DataTable
        Dim dt As New DataTable
        Dim hd As New ChiTietHoaDonDAO
        dt = hd.LayChiTietHoaDon(ct)
        Return dt
    End Function

    Public Function RefreshHoaDon() As DataTable
        Dim dt As New DataTable
        Dim hd As New ChiTietHoaDonDAO
        dt = hd.RefreshChiTietHoaDon
        Return dt
    End Function

    Public Sub updateChitietHD(ByVal id As HoaDonDTO)
        Dim chi As New ChiTietHoaDonDAO
        chi.UpdateChiTietHoaDon(id)
    End Sub
End Class
